aliases:
- Advanced Markdown
permalink: advanced-syntax
Learn how to add advanced formatting syntax to your notes.
You can create tables using vertical bars (|
) to separate columns and hyphens (-
) to define headers. Here's an example:
| First name | Last name |
| ---------- | --------- |
| Max | Planck |
| Marie | Curie |
First name | Last name |
---|---|
Max | Planck |
Marie | Curie |
While the vertical bars on either side of the table are optional, including them is recommended for readability.
You can insert a table using the Insert Table command from the Command Palette or by right-clicking and selecting Insert → Table. This will give you a basic, editable table:
| | |
| --- | --- |
| | |
Note that cells don't need perfect alignment, but the header row must contain at least two hyphens:
First name | Last name
-- | --
Max | Planck
Marie | Curie
You can use basic formatting syntax to style content within a table.
First column | Second column |
---|---|
Internal links | Link to a file within your vault. |
Embed files |
If you want to use aliases, or to resize an image in your table, you need to add a \
before the vertical bar.
First column | Second column
-- | --
[[Basic formatting syntax\|Markdown syntax]] | ![[Engelbart.jpg\|200]]
First column | Second column |
---|---|
Markdown syntax |
Align text in columns by adding colons (:
) to the header row. You can also align content in Live Preview via the context menu.
Left-aligned text | Center-aligned text | Right-aligned text
:-- | :--: | --:
Content | Content | Content
Left-aligned text | Center-aligned text | Right-aligned text |
---|---|---|
Content | Content | Content |
You can add diagrams and charts to your notes, using Mermaid. Mermaid supports a range of diagrams, such as flow charts, sequence diagrams, and timelines.
You can also try Mermaid's Live Editor to help you build diagrams before you include them in your notes.
To add a Mermaid diagram, create a mermaid
code block.
```mermaid
sequenceDiagram
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
John-->>-Alice: I feel great!
```
```mermaid
graph TD
Biology --> Chemistry
```
You can create internal links in your diagrams by attaching the internal-link
class to your nodes.
```mermaid
graph TD
Biology --> Chemistry
class Biology,Chemistry internal-link;
```
Internal links from diagrams don't show up in the Graph view.
If you have many nodes in your diagrams, you can use the following snippet.
```mermaid
graph TD
A[Biology]
B[Chemistry]
A --> B
class A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z internal-link;
```
This way, each letter node becomes an internal link, with the node text as the link text.
If you use special characters in your note names, you need to put the note name in double quotes.
class "⨳ special character" internal-link
Or, A["⨳ special character"]
.
For more information about creating diagrams, refer to the official Mermaid docs.
You can add math expressions to your notes using MathJax and the LaTeX notation.
To add a MathJax expression to your note, surround it with double dollar signs ($$
).
$$
\begin{vmatrix}a & b\\
c & d
\end{vmatrix}=ad-bc
$$
You can also inline math expressions by wrapping it in $
symbols.
This is an inline math expression $e^{2i\pi} = 1$.
This is an inline math expression
For more information about the syntax, refer to MathJax basic tutorial and quick reference.
For a list of supported MathJax packages, refer to The TeX/LaTeX Extension List.